A Technical Case Study in Full-Stack Development & Deployment
The Python Recipe Application is a full-stack web application designed to allow users to browse and view detailed cooking recipes. The primary goal was to create a functional, database-driven application and manage its full lifecycle, from initial development to live deployment.
Objective:
To build a scalable and maintainable data-centric web app using Django, hosted on a cloud platform (Heroku).
In the initial design, the recipe image was stored using Django's built-in `ImageField`. When deploying to Heroku, which uses an ephemeral file system, storing user-uploaded media (like images) directly is impossible. Standard practice involves using a third-party cloud storage service (like AWS S3).
The change from `ImageField` to `URLField` required updating all affected frontend templates (`list.html` and `recipe_detail.html`). These templates were previously attempting to access the `.url` attribute of the image object, which is only present on Django's file-based fields, not on plain string fields.
<img src="{{ recipe.pic.url }}" ...> <-- OLD (File Field)
<img src="{{ recipe.pic }}" ...> <-- NEW (URL Field)
This ensures that the template correctly renders the image URL string provided by the database field.
The Recipe Application successfully demonstrates proficiency in Python/Django development, relational database integration (PostgreSQL), template rendering, and managing production deployment challenges on platforms like Heroku. The refactoring of the image handling process highlights the ability to adapt core architecture when facing platform constraints.